<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * @author Garry
 *
 *
 */
class page  extends BaseController  { 
	/**
	 * @author Garry Willits
	 * @copyright 
	 * @date 30th April 2011
	 * @desc A page controller controls the out put of an entire page
	 *       this would be inherited in child classes
	 */
	protected  $display;
	
	/**
	 * 
	 * Effectively the home page
	 */
	public function __construct()
	{   
		$this->display = new PageDisplay();
		parent::__construct();
	}
	
	/**
	 * 
	 * adds a child display to this composite
	 * @param Display $display
	 */
	public function addChild( Display  $childdisplay,$token="" ){
		$this->display->addChild( $childdisplay,$token );
	}
	/**
	 * 
	 * The out put method is used by pages to generate appropriate views
	 */
	public function output( ){
		$this->display->title = 'Hello World';
		$this->display->pagecontent = 'standard';
		$this->display->scripts = 'jquery.js';
		$this->display->scripts = 'jquery-ui.js';
		$this->display->scripts = 'jquery.lightbox-0.5.js';
		$this->display->scripts = 'uiinit.js'; 
		$this->display->styles = 'ui';
		$this->display->styles = 'themes/smoothness/jquery.ui.all';
		$this->display->styles = 'font-awesome.min';
		$this->display->styles = 'lightbox';
		$this->display->styles = 'common';
		
		$this->display->finalize();
	}
}


?>